package com.iss.demo.service;

import com.iss.demo.dao.ggCourseDao;
import com.iss.demo.entity.ggCourse;
import com.iss.demo.model.ggCourseModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ggCourseService {
    @Autowired
    private ggCourseDao dao;

    public List<ggCourseModel> selectAll(){
        List<ggCourseModel> list = new ArrayList<>();
        list = dao.selectAll();
        return list;
    }

    public Integer delete(Integer gg_ids[]){
        return dao.delete(gg_ids);
    }

    public ggCourse selectById(Integer id){return dao.selectByid(id);}
    public Integer insertCourse(ggCourse ggcourse){
        return dao.insertCourse(ggcourse);
    }
    public Integer updateCourse(ggCourse ggcourse){
        return dao.updateCourse(ggcourse);
    }

    public ggCourseModel selectInfoById(Integer id){
        return dao.selectInfoById(id);
    }

    public Integer updateggCourseInfo(String surface,String info ,Integer id){
        return dao.updateInfo(surface,info,id);
    }
}
